package cn.tedu.egmvc1.controller;

import cn.tedu.egmvc1.pojo.dto.EmpDTO;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class EgContriller1 {
    @RequestMapping("/emp/insert")
    @ResponseBody
    public String insert(EmpDTO empDTO){
        String name = empDTO.getName();
        Double salary = empDTO.getSalary();
        String job = empDTO.getJob();
        return "添加成功";
    }
    @RequestMapping("/emp/select")
    @ResponseBody
    public String select(){
        return "查询成功";
    }
    @RequestMapping("/emp/update")
    @ResponseBody
    public String update(EmpDTO empDTO){
        String name = empDTO.getName();
        Double salary = empDTO.getSalary();
        String job = empDTO.getJob();
        return "修改成功";
    }
    @RequestMapping("/emp/delete")
    @ResponseBody
    public String delete(String id){

        return id+"删除成功";
    }
}
